<include file="../header" />
<script language="javascript" src="/Template/js/LodopFuncs.js"></script>
<script src='http://localhost:8000/CLodopfuncs.js?name=LODOP'></script>
<object  id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0>
    <embed id="LODOP_EM" type="application/x-print-lodop" width=0 height=0></embed>
</object>
<body class="J_scroll_fixed">
<script language="javascript" type="text/javascript">
    var LODOP;
    function CheckIsInstall() {
        try{
            LODOP=getLodop();
            if (LODOP.VERSION) {
                if (LODOP.CVERSION)
                    alert("当前有C-Lodop云打印可用!\n C-Lodop版本:"+LODOP.CVERSION+"(内含Lodop"+LODOP.VERSION+")");
                else
                    alert("本机已成功安装了Lodop控件！\n 版本号:"+LODOP.VERSION);

            };
        }catch(err){
        }
    };

    function preview(content) {
        LODOP=getLodop();
        LODOP.SET_PRINT_PAGESIZE(1, 0, 0,"A4");
        LODOP.ADD_PRINT_DATA("ProgramData",content); //装载模板
        LODOP=getLodop(document.getElementById('LODOP_OB'),document.getElementById('LODOP_EM'));
        LODOP.PREVIEW();
    };
</script>
<style type="text/css">
    .btn-danger,.btn-info,.btn-success,.btn-warning{
        width: 100px;
        /*height: 18px;*/
        padding: 2px 0px 2px 0px;
        margin: 1px 0px 1px 0px;
    }
</style>

<div class="wrap J_check_wrap">
    <table class="table table-hover table-bordered">
        <thead>
        <tr>
            <th style="min-width: 330px" width="200px">模板名称</th>
            <th style="min-width: 100px" width="100px">操作</th>
            <th></th>
        </tr>
        </thead>
        <tbody>
        <foreach name="templateList" item="vo">
            <tr>
                <td>
                    {$vo.template_name}
                </td>
                <td>
                    <button type="button" class="btn btn-info" onclick='javascript:preview("{$vo.template_content}")'>预览</button>
                </td>
                <td></td>
            </tr>
        </foreach>
        </tbody>
    </table>
</div>
<script src="__ROOT__/statics/js/common.js"></script>
</body>
</html>